import request from '@/utils/request'
import { url as phpUrl } from '../utils/php'
const url = phpUrl()
export function getLiveList(params) {
  return request({
    url: url + 'lives',
    method: 'get',
    params: params
  })
}
/**
 * 添加直播
 * @param data
 */
export function createLive(data) {
  return request({
    url: url + 'lives',
    method: 'post',
    data: data
  })
}
/**
 * 编辑直播
 * @param data
 */
export function updateLive(data, id) {
  return request({
    url: url + 'lives/' + id,
    method: 'put',
    data: data
  })
}

/**
 * 删除直播
 */
export function deleteLive(id) {
  return request({
    url: url + 'lives/' + id,
    method: 'delete'
  })
}
